package com.ssm.reader.service;

import com.ssm.reader.mapper.TestMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/*
 *
 *
 *@data 2022-04-29
 */
@Service
public class TestService {
    @Resource
    /*使用mybatis就没有dao这个包，变成了mapper包,和带dao的mybatis的使用不太一样*/
    private TestMapper testMapper;

    //@Transactional//加入声明式事务
    public void batchImport(){
        testMapper.insertSample();
    }

}
